/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package systole.view.crud.tableModels;

import java.util.List;
import javax.swing.event.TableModelListener;
import javax.swing.table.TableModel;

/**
 * 
 * @param <T> entity
 * @author jmj
 */
public abstract class SystoleTableModel<T> implements TableModel {

    protected List<T> entities;

    /**
     * 
     * @param entities
     */
    public SystoleTableModel(List<T> entities) {
        super();
        this.entities = entities;
    }

    public boolean isCellEditable(int arg0, int arg1) {
        return false;
    }

    public void addTableModelListener(TableModelListener arg0) {
    }

    public void removeTableModelListener(TableModelListener arg0) {
    }

    public int getRowCount() {
        return this.entities.size();
    }

    /**
     * @param list
     */
    public void refreshList(List<T> list) {
        this.entities = list;
    }
}
